1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module shumate.c.types;
26 
27 public import gdk.c.types;
28 public import gio.c.types;
29 public import glib.c.types;
30 public import gobject.c.types;
31 public import gtk.c.types;
32 
33 
34 /**
35  * Error codes in the #SHUMATE_FILE_CACHE_ERROR domain.
36  */
37 public enum ShumateFileCacheError
38 {
39 	/**
40 	 * An unspecified error occurred during the operation.
41 	 */
42 	FAILED = 0,
43 }
44 alias ShumateFileCacheError FileCacheError;
45 
46 /**
47  * Projections supported by the library.
48  */
49 public enum ShumateMapProjection
50 {
51 	/**
52 	 * Currently the only supported projection
53 	 */
54 	MERCATOR = 0,
55 }
56 alias ShumateMapProjection MapProjection;
57 
58 /**
59  * Tile loading state.
60  */
61 public enum ShumateState
62 {
63 	/**
64 	 * Initial or undefined state
65 	 */
66 	NONE = 0,
67 	/**
68 	 * Tile is loading
69 	 */
70 	LOADING = 1,
71 	/**
72 	 * Tile is loaded but not yet displayed
73 	 */
74 	LOADED = 2,
75 	/**
76 	 * Tile loading finished. Also used to inform map sources
77 	 * that tile loading has been cancelled.
78 	 */
79 	DONE = 3,
80 }
81 alias ShumateState State;
82 
83 /**
84  * Error codes that occurs while parsing the style in [class@VectorRenderer].
85  */
86 public enum ShumateStyleError
87 {
88 	/**
89 	 * An unspecified error occurred during the operation.
90 	 */
91 	FAILED = 0,
92 	/**
93 	 * A JSON node in the style has the wrong type (e.g. an object where there should be an array).
94 	 */
95 	MALFORMED_STYLE = 1,
96 	/**
97 	 * An unsupported layer type was encountered.
98 	 */
99 	UNSUPPORTED_LAYER = 2,
100 	/**
101 	 * An invalid or unrecognized expression was encountered.
102 	 */
103 	INVALID_EXPRESSION = 3,
104 	/**
105 	 * Libshumate was compiled without vector tile support.
106 	 */
107 	SUPPORT_OMITTED = 4,
108 }
109 alias ShumateStyleError StyleError;
110 
111 /**
112  * Error codes in the #SHUMATE_TILE_DOWNLOADER_ERROR domain.
113  */
114 public enum ShumateTileDownloaderError
115 {
116 	/**
117 	 * An unspecified error occurred during the operation.
118 	 */
119 	FAILED = 0,
120 	/**
121 	 * An unsuccessful HTTP response was received from the server.
122 	 */
123 	BAD_RESPONSE = 1,
124 	/**
125 	 * The server could not be reached.
126 	 */
127 	COULD_NOT_CONNECT = 2,
128 	/**
129 	 * The provided URL isn't valid
130 	 */
131 	MALFORMED_URL = 3,
132 	/**
133 	 * The tile source has been marked as offline.
134 	 */
135 	OFFLINE = 4,
136 }
137 alias ShumateTileDownloaderError TileDownloaderError;
138 
139 /**
140  * Units used by the scale.
141  */
142 public enum ShumateUnit
143 {
144 	/**
145 	 * Both metric and imperial units
146 	 */
147 	BOTH = 0,
148 	/**
149 	 * Metric units (meters)
150 	 */
151 	METRIC = 1,
152 	/**
153 	 * Imperial units (miles)
154 	 */
155 	IMPERIAL = 2,
156 }
157 alias ShumateUnit Unit;
158 
159 struct ShumateCompass;
160 
161 struct ShumateCompassClass
162 {
163 	GtkWidgetClass parentClass;
164 }
165 
166 struct ShumateCoordinate
167 {
168 	GObject parentInstance;
169 }
170 
171 struct ShumateCoordinateClass
172 {
173 	GObjectClass parentClass;
174 }
175 
176 struct ShumateDataSource
177 {
178 	GObject parentInstance;
179 }
180 
181 struct ShumateDataSourceClass
182 {
183 	GObjectClass parentClass;
184 	/** */
185 	extern(C) void function(ShumateDataSource* self, int x, int y, int zoomLevel, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) getTileDataAsync;
186 	/**
187 	 *
188 	 * Params:
189 	 *     self = a [class@DataSource]
190 	 *     result = a #GAsyncResult provided to callback
191 	 * Returns: The requested data, or %NULL if an
192 	 *     error occurred
193 	 *
194 	 * Throws: GException on failure.
195 	 */
196 	extern(C) GBytes* function(ShumateDataSource* self, GAsyncResult* result, GError** err) getTileDataFinish;
197 }
198 
199 struct ShumateFileCache
200 {
201 	GObject parentInstance;
202 }
203 
204 struct ShumateFileCacheClass
205 {
206 	GObjectClass parentClass;
207 }
208 
209 struct ShumateLayer
210 {
211 	GtkWidget parentInstance;
212 }
213 
214 struct ShumateLayerClass
215 {
216 	GtkWidgetClass parentClass;
217 }
218 
219 struct ShumateLicense;
220 
221 struct ShumateLicenseClass
222 {
223 	GtkWidgetClass parentClass;
224 }
225 
226 struct ShumateLocation;
227 
228 /**
229  * An interface common to objects having latitude and longitude.
230  */
231 struct ShumateLocationInterface
232 {
233 	GTypeInterface gIface;
234 	/**
235 	 *
236 	 * Params:
237 	 *     location = a #ShumateLocation
238 	 * Returns: the latitude coordinate in degrees.
239 	 */
240 	extern(C) double function(ShumateLocation* location) getLatitude;
241 	/**
242 	 *
243 	 * Params:
244 	 *     location = a #ShumateLocation
245 	 * Returns: the longitude coordinate in degrees.
246 	 */
247 	extern(C) double function(ShumateLocation* location) getLongitude;
248 	/** */
249 	extern(C) void function(ShumateLocation* location, double latitude, double longitude) setLocation;
250 }
251 
252 struct ShumateMap
253 {
254 	GtkWidget parentInstance;
255 }
256 
257 struct ShumateMapClass
258 {
259 	GtkWidgetClass parentClass;
260 }
261 
262 struct ShumateMapLayer;
263 
264 struct ShumateMapLayerClass
265 {
266 	ShumateLayerClass parentClass;
267 }
268 
269 struct ShumateMapSource
270 {
271 	GObject parentInstance;
272 }
273 
274 struct ShumateMapSourceClass
275 {
276 	GObjectClass parentClass;
277 	/** */
278 	extern(C) void function(ShumateMapSource* self, ShumateTile* tile, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) fillTileAsync;
279 	/**
280 	 *
281 	 * Params:
282 	 *     self = a #ShumateMapSource
283 	 *     result = a #GAsyncResult provided to callback
284 	 * Returns: %TRUE if the tile was filled with valid data, otherwise %FALSE
285 	 *
286 	 * Throws: GException on failure.
287 	 */
288 	extern(C) int function(ShumateMapSource* self, GAsyncResult* result, GError** err) fillTileFinish;
289 }
290 
291 struct ShumateMapSourceRegistry;
292 
293 struct ShumateMapSourceRegistryClass
294 {
295 	GObjectClass parentClass;
296 }
297 
298 struct ShumateMarker
299 {
300 	GtkWidget parentInstance;
301 }
302 
303 struct ShumateMarkerClass
304 {
305 	GtkWidgetClass parentClass;
306 }
307 
308 struct ShumateMarkerLayer
309 {
310 	ShumateLayer parentInstance;
311 }
312 
313 struct ShumateMarkerLayerClass
314 {
315 	ShumateLayerClass parentClass;
316 }
317 
318 struct ShumateMemoryCache
319 {
320 	GObject parentInstance;
321 }
322 
323 struct ShumateMemoryCacheClass
324 {
325 	GObjectClass parentClass;
326 }
327 
328 struct ShumatePathLayer
329 {
330 	ShumateLayer parentInstance;
331 }
332 
333 struct ShumatePathLayerClass
334 {
335 	ShumateLayerClass parentClass;
336 }
337 
338 struct ShumatePoint;
339 
340 struct ShumatePointClass
341 {
342 	ShumateMarkerClass parentClass;
343 }
344 
345 struct ShumateRasterRenderer;
346 
347 struct ShumateRasterRendererClass
348 {
349 	ShumateMapSourceClass parentClass;
350 }
351 
352 struct ShumateScale;
353 
354 struct ShumateScaleClass
355 {
356 	GtkWidgetClass parentClass;
357 }
358 
359 struct ShumateSimpleMap;
360 
361 struct ShumateSimpleMapClass
362 {
363 	GtkWidgetClass parentClass;
364 }
365 
366 struct ShumateTile
367 {
368 	GtkWidget parentInstance;
369 }
370 
371 struct ShumateTileClass
372 {
373 	GtkWidgetClass parentClass;
374 }
375 
376 struct ShumateTileDownloader;
377 
378 struct ShumateTileDownloaderClass
379 {
380 	ShumateDataSourceClass parentClass;
381 }
382 
383 struct ShumateVectorRenderer;
384 
385 struct ShumateVectorRendererClass
386 {
387 	ShumateMapSourceClass parentClass;
388 }
389 
390 struct ShumateViewport;
391 
392 struct ShumateViewportClass
393 {
394 	GObjectClass parentClass;
395 }
396 
397 /**
398  * The major version of libshumate (1, if %SHUMATE_VERSION is 1.2.3)
399  */
400 enum MAJOR_VERSION = 1;
401 alias SHUMATE_MAJOR_VERSION = MAJOR_VERSION;
402 
403 /**
404  * Maps for Free Relief
405  */
406 enum MAP_SOURCE_MFF_RELIEF = "mff-relief";
407 alias SHUMATE_MAP_SOURCE_MFF_RELIEF = MAP_SOURCE_MFF_RELIEF;
408 
409 /**
410  * OpenStreetMap Cycle Map
411  */
412 enum MAP_SOURCE_OSM_CYCLE_MAP = "osm-cyclemap";
413 alias SHUMATE_MAP_SOURCE_OSM_CYCLE_MAP = MAP_SOURCE_OSM_CYCLE_MAP;
414 
415 /**
416  * OpenStreetMap Mapnik
417  */
418 enum MAP_SOURCE_OSM_MAPNIK = "osm-mapnik";
419 alias SHUMATE_MAP_SOURCE_OSM_MAPNIK = MAP_SOURCE_OSM_MAPNIK;
420 
421 /**
422  * OpenStreetMap Transport Map
423  */
424 enum MAP_SOURCE_OSM_TRANSPORT_MAP = "osm-transportmap";
425 alias SHUMATE_MAP_SOURCE_OSM_TRANSPORT_MAP = MAP_SOURCE_OSM_TRANSPORT_MAP;
426 
427 /**
428  * OpenWeatherMap clouds layer
429  */
430 enum MAP_SOURCE_OWM_CLOUDS = "owm-clouds";
431 alias SHUMATE_MAP_SOURCE_OWM_CLOUDS = MAP_SOURCE_OWM_CLOUDS;
432 
433 /**
434  * OpenWeatherMap precipitation
435  */
436 enum MAP_SOURCE_OWM_PRECIPITATION = "owm-precipitation";
437 alias SHUMATE_MAP_SOURCE_OWM_PRECIPITATION = MAP_SOURCE_OWM_PRECIPITATION;
438 
439 /**
440  * OpenWeatherMap sea level pressure
441  */
442 enum MAP_SOURCE_OWM_PRESSURE = "owm-pressure";
443 alias SHUMATE_MAP_SOURCE_OWM_PRESSURE = MAP_SOURCE_OWM_PRESSURE;
444 
445 /**
446  * OpenWeatherMap temperature
447  */
448 enum MAP_SOURCE_OWM_TEMPERATURE = "owm-temperature";
449 alias SHUMATE_MAP_SOURCE_OWM_TEMPERATURE = MAP_SOURCE_OWM_TEMPERATURE;
450 
451 /**
452  * OpenWeatherMap wind
453  */
454 enum MAP_SOURCE_OWM_WIND = "owm-wind";
455 alias SHUMATE_MAP_SOURCE_OWM_WIND = MAP_SOURCE_OWM_WIND;
456 
457 /**
458  * The maximal possible latitude value.
459  */
460 enum MAX_LATITUDE = 85.0511287798;
461 alias SHUMATE_MAX_LATITUDE = MAX_LATITUDE;
462 
463 /**
464  * The maximal possible longitude value.
465  */
466 enum MAX_LONGITUDE = 180.0;
467 alias SHUMATE_MAX_LONGITUDE = MAX_LONGITUDE;
468 
469 /**
470  * The micro version of libshumate (3, if %SHUMATE_VERSION is 1.2.3)
471  */
472 enum MICRO_VERSION = 0;
473 alias SHUMATE_MICRO_VERSION = MICRO_VERSION;
474 
475 /**
476  * The minor version of libshumate (2, if %SHUMATE_VERSION is 1.2.3)
477  */
478 enum MINOR_VERSION = 0;
479 alias SHUMATE_MINOR_VERSION = MINOR_VERSION;
480 
481 /**
482  * The minimal possible latitude value.
483  */
484 enum MIN_LATITUDE = -85.0511287798;
485 alias SHUMATE_MIN_LATITUDE = MIN_LATITUDE;
486 
487 /**
488  * The minimal possible longitude value.
489  */
490 enum MIN_LONGITUDE = -180.0;
491 alias SHUMATE_MIN_LONGITUDE = MIN_LONGITUDE;